load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

location_f="/Users/ivana/WORK_BSC/final_figures_allmodels/cam4som/"

fc    = addfile(location_f + "streamfunction_ano_djf_ccsm4som.nc", "r")

ano=fc->SFANO

;********************************************
;            Making Plots
;********************************************
wks = gsn_open_wks("pdf","streamfunction_ano_250hpa_djf_ccsm4som")

gsn_define_colormap(wks,"BlueDarkOrange18")
plot = new(1,graphic)                          ; create a plot array

  res          = True
  res@gsnDraw  = False                          ; don't draw
  res@gsnFrame = False                          ; don't advance frame, these 2
  res@cnInfoLabelOn = False                     ; turn off cn info label

  res@cnLinesOn           = True
  res@cnFillOn            = True          ; turn on color
  res@lbLabelBarOn        = True 

  res@cnLevelSelectionMode =  "ExplicitLevels"

  res@cnLineLabelsOn=False
  res@mpCenterLonF     = 290.
  res@gsnPolar   = "NH"
  res@mpMinLatF            = 0.

 res@cnMonoLineColor = True
 res@cnMonoLineThickness= True
 res@cnLineThicknessF = 2.
 res@cnLineColorF= "black"

 res@gsnContourNegLineDashPattern=1
 res@gsnContourZeroLineThicknessF=3

 res@mpGeophysicalLineThicknessF = 2.
 res@gsnLeftString = ""
 res@gsnCenterString = ""
 res@gsnRightString = ""
 res@lbAutoManage = False
 res@lbLabelFontHeightF  = 0.017
 res@pmLabelBarHeightF  = 0.08

 res@cnFillColors = (/2,3,4,5,8,10,0,0,13,14,15,16,17,18/)
 res@cnLevels =(/-20.,-15.,-10.,-7.5,-5.,-2.5,0,2.5,5.,7.5,10.,15.,20./)
 plot(0) = gsn_csm_contour_map(wks,ano(:,:),res)

 ;________________________
; creating the panel:
;________________________
 resP            = True

resP@gsnPanelLabelBar    = False;True                ; add common colorbar
resP@lbLabelFontHeightF  = 0.007               ; make labels smaller

resP@gsnPanelBottom   = 0.05                   ; add space at bottom
;resP@gsnPanelFigureStrings= (/"a)","b)","c)"/) ; add strings to panel
res@txFontHeightF     = .24


resP@gsnMaximize    = True                ; maximize plot
gsn_panel(wks,plot,(/1,1/),resP)

 
